from flask import Flask, make_response

app = Flask(__name__)
@app.route('/')
def index():
    # 1.返回元组,返回多个值
    # return 'index',404,{'token':'laowang'}

    # 2.使用response设置
    response = make_response('index')
    response.status_code = 405
    response.headers['name'] = 'laoli'
    return response

if __name__ == '__main__':
    app.run(debug=True)